// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ViewModelWhichHasSamePropertyNameAsParentType.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Defines the ViewModelWithAPropertyToOverride type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.ComponentModel.Modelling.TestAssets
{
    using System.Diagnostics.CodeAnalysis;

    [SuppressMessage("Microsoft.StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass",
        Justification = "Reviewed. Suppression is OK here.")]
    public class ViewModelWhichHasSamePropertyNameAsParentType<T> : ViewModelWithAPropertyToOverride
    {
        public new T Something
        {
            get { return (T)base.Something; }
            set { base.Something = value; }
        }
    }

    public class ViewModelWithAPropertyToOverride : TestModelBase
    {
        private object _something;

        public new MetaModelType MetaModelType
        {
            get { return base.MetaModelType; }
        }

        public object Something
        {
            get { return _something; }
            set { SetProperty(ref _something, value, () => Something); }
        }
    }
}